.base {
  --tag-border-width: var(--cui-border-width-kilo);

  position: relative;
  display: inline-block;
}

.content {
  display: inline-flex;
  align-items: center;
  padding: var(--cui-spacings-bit) var(--cui-spacings-kilo);
  margin: 0;
  font-size: var(--cui-body-m-font-size);
  line-height: var(--cui-body-m-line-height);
  color: var(--cui-fg-normal);
  overflow-wrap: break-word;
  cursor: default;
  background-color: var(--cui-bg-normal);
  border: var(--tag-border-width) solid var(--cui-border-normal);
  border-radius: var(--cui-border-radius-byte);
  transition:
    opacity var(--cui-transitions-default),
    color var(--cui-transitions-default),
    background-color var(--cui-transitions-default),
    border-color var(--cui-transitions-default);
}

.removable .content {
  padding-right: calc(var(--cui-spacings-bit) + var(--cui-spacings-tera));
}

.selected .content {
  color: var(--cui-fg-on-strong);
  background-color: var(--cui-bg-accent-strong);
  border-color: var(--cui-border-accent);
}

/* Interactive */

a.content,
button.content {
  text-align: left;
  cursor: pointer;
  outline: 0;
}

a.content:hover,
button.content:hover {
  color: var(--cui-fg-normal-hovered);
  background-color: var(--cui-bg-normal-hovered);
  border-color: var(--cui-border-normal-hovered);
}

a.content:active,
button.content:active {
  color: var(--cui-fg-normal-pressed);
  background-color: var(--cui-bg-normal-pressed);
  border-color: var(--cui-border-normal-pressed);
}

.selected a.content:hover,
.selected button.content:hover {
  color: var(--cui-fg-on-strong-hovered);
  background-color: var(--cui-bg-accent-strong-hovered);
  border-color: var(--cui-border-accent-hovered);
}

.selected a.content:active,
.selected button.content:active {
  color: var(--cui-fg-on-strong-pressed);
  background-color: var(--cui-bg-accent-strong-pressed);
  border-color: var(--cui-border-accent-pressed);
}

.prefix {
  flex-shrink: 0;
  margin-right: var(--cui-spacings-bit);
  margin-left: calc(-1 * var(--cui-spacings-bit));
}

.suffix {
  flex-shrink: 0;
  margin-right: calc(-1 * var(--cui-spacings-bit));
  margin-left: var(--cui-spacings-bit);
}

.base .remove-button {
  position: absolute;
  top: 50%;
  right: var(--tag-border-width);
  border: 0;
  border-radius: var(--cui-border-radius-byte);
  transform: translateY(-50%);
}
